Function at 0x406050
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4cd9d8
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x510a50]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x50], 0
mov esi, ecx
mov dword [ebp - 4], 0xffffffff
cmp eax, 0x320
jge 0x4060b1
mov eax, dword [esi + 0xbc]
sub eax, dword [esi + 0xb8]
sar eax, 2
test eax, eax
jne 0x40612e
mov eax, 0x3d6
mov dword [ebp - 0x48], eax
mov eax, dword [esi + 0xb4]
mov ecx, dword [eax + 2]
mov dword [ebp - 0x3c], ecx
mov edx, dword [eax + 6]
mov dword [ebp - 0x38], edx
mov ecx, dword [eax + 0xa]
mov dword [ebp - 0x44], ecx
mov edx, dword [eax + 0xe]
mov dword [ebp - 0x40], edx
mov ecx, dword [eax + 0x12]
mov dword [ebp - 0x34], ecx
mov edx, dword [eax + 0x16]
mov dword [ebp - 0x30], edx
mov cl, byte [eax]
add eax, 0xb0
lea edx, [ebp - 0x2b]
mov byte [ebp - 0x2c], cl
sub edx, eax
lea ecx, [ecx]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4060f0
mov ecx, dword [esi + 0xa4]
push 0
lea edx, [ebp - 0x50]
push edx
push 0x33
lea eax, [ebp - 0x48]
push eax
push ecx
call dword [sym.imp.KERNEL32.DLL_WriteFile]
mov edx, dword [esi + 0xb0]
push 0x33
push 1
push 0x47b
push edx
call dword [sym.imp.USER32.dll_PostMessageW]
jmp 0x406415
mov edi, dword [esi + 0xb8]
mov ecx, dword [edi]
mov ecx, dword [ecx + 2]
cmp ecx, 0x2b1
jl 0x406153
cmp ecx, 0x2b3
jg 0x406153
mov eax, 2
jmp 0x406417
lea ebx, [eax*4 + 3]
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x5c], ebx
cmp edi, dword [esi + 0xbc]
je 0x4061cd
mov ecx, dword [edi]
movzx eax, byte [ecx]
dec eax
cmp eax, 7
ja case.default.0x406177
jmp dword [eax*4 + 0x406474]
call fcn.004173a0
jmp 0x4061b5
push ecx
call fcn.00417500
jmp 0x4061b2
push ecx
call fcn.00417590
jmp 0x4061b2
push ecx
call fcn.00417630
jmp 0x4061b2
push ecx
call fcn.004176d0
jmp 0x4061b2
call fcn.00417770
jmp 0x4061b5
push ecx
call fcn.00417990
add esp, 4
test eax, eax
je case.default.0x406177
add edi, 4
add ebx, eax
cmp edi, dword [esi + 0xbc]
jne 0x406168
mov dword [ebp - 0x4c], ebx
push ebx
call fcn.00460bbb
add esp, 4
xor edi, edi
push eax
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x58], edi
mov dword [ebp - 0x54], edi
call fcn.004068f0
push ebx
push edi
mov edi, dword [ebp - 0x58]
push edi
call fcn.00488a00
mov edx, dword [esi + 0xbc]
sub edx, dword [esi + 0xb8]
add esp, 0xc
sar edx, 2
mov word [edi + 1], dx
mov ebx, dword [esi + 0xb8]
cmp ebx, dword [esi + 0xbc]
je 0x4063a4
add edi, 3
mov dword [ebp - 0x50], edi
mov ecx, dword [ebx]
mov eax, dword [ecx + 0x25d]
mov dword [ecx + 0xa], eax
mov byte [ecx], 8
mov edx, dword [esi + 0xb4]
mov al, byte [edx + 1]
mov byte [ecx + 1], al
mov eax, dword [esi + 0xb4]
mov edx, dword [eax + 2]
mov dword [ecx + 0xe], edx
mov eax, dword [eax + 6]
mov dword [ecx + 0x12], eax
mov eax, dword [esi + 0xb4]
mov edx, dword [eax + 0xa]
mov dword [ecx + 0x16], edx
mov eax, dword [eax + 0xe]
mov dword [ecx + 0x1a], eax
mov edx, dword [esi + 0xb4]
movzx eax, word [edx + 0x24]
mov word [ecx + 0x26], ax
mov edx, dword [esi + 0xb4]
movzx eax, word [edx + 0x26]
mov word [ecx + 0x28], ax
mov edx, dword [esi + 0xb4]
movzx eax, word [edx + 0x1e]
mov word [ecx + 0x2a], ax
mov eax, dword [esi + 0xb4]
add eax, 0x30
lea edi, [ecx + 0x2c]
mov dl, byte [eax]
mov byte [edi], dl
inc eax
inc edi
test dl, dl
jne 0x406294
mov eax, dword [esi + 0xb4]
add eax, 0xdc
lea edi, [ecx + 0xd8]
nop
mov dl, byte [eax]
mov byte [edi], dl
inc eax
inc edi
test dl, dl
jne 0x4062b0
mov edx, dword [ebp - 0x58]
add edx, dword [ebp - 0x5c]
je case.default.0x4062d3
movzx eax, byte [ecx]
dec eax
cmp eax, 7
ja case.default.0x4062d3
jmp dword [eax*4 + 0x406494]
mov eax, 3
jmp 0x406417
push edx
call fcn.00417a20
jmp 0x406320
push edx
mov edx, ecx
call fcn.00417d50
jmp 0x406320
push edx
call fcn.00417df0
jmp 0x406320
push edx
call fcn.00417f30
jmp 0x406320
push edx
call fcn.00418070
jmp 0x406320
push edx
push ecx
call fcn.004181c0
add esp, 8
jmp 0x406323
push ecx
call fcn.00418840
add esp, 4
test eax, eax
je case.default.0x4062d3
mov ecx, dword [ebx]
movzx eax, byte [ecx]
dec eax
cmp eax, 7
ja case.default.0x406336
jmp dword [eax*4 + 0x4064b4]
call fcn.004173a0
jmp 0x406384
push ecx
call fcn.00417500
add esp, 4
jmp 0x406384
push ecx
call fcn.00417590
add esp, 4
jmp 0x406384
push ecx
call fcn.00417630
add esp, 4
jmp 0x406384
push ecx
call fcn.004176d0
add esp, 4
jmp 0x406384
call fcn.00417770
jmp 0x406384
push ecx
call fcn.00417990
add esp, 4
jmp 0x406384
xor eax, eax
mov ecx, dword [ebp - 0x50]
add dword [ebp - 0x5c], eax
mov dword [ecx], eax
add ecx, 4
add ebx, 4
mov dword [ebp - 0x50], ecx
cmp ebx, dword [esi + 0xbc]
jne 0x406220
mov edi, dword [ebp - 0x58]
mov ebx, dword [ebp - 0x4c]
lea ecx, [ebx - 1]
lea edx, [edi + 1]
call fcn.00416e40
push 0
lea ecx, [ebp - 0x60]
push ecx
push ebx
mov byte [edi], al
mov edx, dword [esi + 0xa4]
push edi
push edx
call dword [sym.imp.KERNEL32.DLL_WriteFile]
mov eax, dword [esi + 0xb0]
push ebx
push 0
push 0x47b
push eax
call dword [sym.imp.USER32.dll_PostMessageW]
mov dword [ebp - 4], 0xffffffff
mov esi, dword [ebp - 0x54]
test esi, esi
je 0x406415
lea ecx, [esi + 4]
or edx, 0xffffffff
lock xadd dword [ecx], edx
jne 0x406415
mov eax, dword [esi]
mov edx, dword [eax]
mov ecx, esi
call edx
lea eax, [esi + 8]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x406415
mov edx, dword [esi]
mov eax, dword [edx + 4]
mov ecx, esi
call eax
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004840ae
mov esp, ebp
pop ebp
ret 4
mov dword [ebp - 4], 0xffffffff
mov esi, dword [ebp - 0x54]
test esi, esi
je 0x40646c
lea ecx, [esi + 4]
or edx, 0xffffffff
lock xadd dword [ecx], edx
jne 0x40646c
mov eax, dword [esi]
mov edx, dword [eax]
mov ecx, esi
call edx
lea eax, [esi + 8]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x40646c
mov edx, dword [esi]
mov eax, dword [edx + 4]
mov ecx, esi
call eax
mov eax, 4
jmp 0x406417