Function at 0x412010
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x527da8
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x56fcac]
xor eax, esp
mov dword [esp + 0x50], eax
push ebx
push esi
push edi
mov eax, dword [0x56fcac]
xor eax, esp
push eax
lea eax, [esp + 0x68]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
mov eax, dword [edi]
xor esi, esi
cmp eax, 0xffffffff
mov ebx, ecx
mov dword [esp + 0x1c], edi
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], esi
je 0x41209b
push 1
lea ecx, [esp + 0x2c]
push ecx
push esi
push eax
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
mov dword [esp + 0x24], eax
jne 0x41208f
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x41209b
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], edx
mov ecx, dword [ebx + 0xb8]
cmp ecx, esi
je 0x4120cc
mov eax, dword [ecx]
mov edx, dword [eax + 4]
call edx
lea ecx, [ebx + 8]
call fcn.00410300
mov dword [ebx + 0xc0], eax
mov dword [ebx + 0xc4], edx
mov dword [ebx + 0xc8], esi
mov dword [ebx + 0xcc], esi
mov cl, byte [0x548872]
xor eax, eax
mov dword [esp + 0x59], eax
mov word [esp + 0x5d], ax
mov byte [esp + 0x5f], al
mov ax, word [0x548870]
mov byte [esp + 0x5a], cl
lea ecx, [ebx + 8]
mov word [esp + 0x58], ax
mov byte [esp + 0x5b], 1
call fcn.0040fcb0
mov dword [esp + 0x14], eax
mov dword [esp + 0x5c], eax
mov eax, dword [edi]
cmp eax, 0xffffffff
mov dword [esp + 0x18], esi
je 0x41218c
push esi
lea edx, [esp + 0x1c]
push edx
push 8
lea ecx, [esp + 0x64]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41218c
cmp dword [esp + 0x18], 8
jne 0x41218c
mov edx, dword [esp + 0x14]
push 1
push esi
mov dword [esp + 0x54], esi
mov dword [esp + 0x58], esi
push edx
lea esi, [esp + 0x58]
mov eax, edi
call fcn.0043bb10
test al, al
je 0x41218c
mov al, byte [ebx + 0xd0]
test al, al
je 0x412193
mov byte [ebx + 0xd0], 0
mov ebx, dword [ebx + 0xb8]
test ebx, ebx
je 0x412174
mov edx, dword [ebx]
mov eax, dword [edx + 0x14]
push 1
mov ecx, ebx
call eax
mov eax, dword [edi]
cmp eax, 0xffffffff
je 0x41218c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x41218c
mov dword [edi], 0xffffffff
xor al, al
jmp 0x4122a0
push edi
lea eax, [ebx + 8]
push eax
mov ecx, ebx
call fcn.00412470
test al, al
jne 0x4121bf
mov ebx, dword [ebx + 0xb8]
test ebx, ebx
je 0x4121b8
mov edx, dword [ebx]
mov eax, dword [edx + 0x14]
push 0
mov ecx, ebx
call eax
xor al, al
jmp 0x4122a0
xor eax, eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
lea esi, [esp + 0x2c]
mov eax, edi
call fcn.0043ba60
test al, al
je 0x41218c
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x38]
add eax, 8
push 0
adc ecx, 0
push ecx
push eax
lea esi, [esp + 0x58]
mov eax, edi
call fcn.0043bb10
test al, al
je 0x41218c
mov edi, dword [esp + 0x14]
lea esi, [esp + 0x3c]
call fcn.004038c0
lea ecx, [esp + 0x20]
xor eax, eax
push ecx
mov edx, esi
mov dword [esp + 0x74], eax
push edx
lea ecx, [ebx + 8]
mov dword [esp + 0x28], eax
call fcn.0040fd30
test al, al
jne 0x412231
lea ecx, [esp + 0x3c]
call fcn.00403950
xor al, al
jmp 0x4122a0
mov edi, dword [esp + 0x14]
cmp dword [esp + 0x20], edi
jne 0x412224
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x44]
push eax
lea esi, [esp + 0x1c]
call fcn.0043ba10
test al, al
je 0x412224
mov ecx, edi
cmp dword [esp + 0x18], ecx
jne 0x412224
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x2c]
push 0
push edx
push eax
mov eax, dword [esp + 0x28]
lea esi, [esp + 0x38]
call fcn.0043bb10
test al, al
je 0x412224
mov eax, dword [ebx + 0xb8]
test eax, eax
je 0x412295
movzx ecx, byte [ebx + 0xd0]
mov eax, dword [eax]
mov edx, dword [eax + 0x14]
push ecx
mov ecx, dword [ebx + 0xb8]
call edx
lea ecx, [esp + 0x3c]
call fcn.00403950
mov al, 1
mov ecx, dword [esp + 0x68]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.004ead41
mov esp, ebp
pop ebp
ret 4