Function at 0x417340
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x10
push ebx
push ebp
push esi
mov esi, dword [esp + 0x20]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [esp + 0x24]
push 0
push eax
lea ecx, [esp + 0x18]
push 2
push ecx
push esi
mov dword [esp + 0x24], 0x4949
call edi
lea edx, [esp + 0x24]
push 0
push edx
lea eax, [esp + 0x18]
push 2
push eax
push esi
mov dword [esp + 0x24], 0x2a
call edi
lea ecx, [esp + 0x24]
push 0
push ecx
lea edx, [esp + 0x1c]
push 4
push edx
push esi
mov dword [esp + 0x28], 8
call edi
lea eax, [esp + 0x24]
push 0
push eax
lea ecx, [esp + 0x18]
push 2
push ecx
push esi
mov dword [esp + 0x24], 0xa
call edi
mov edx, dword [esp + 0x28]
mov ebx, dword [esp + 0x10]
lea ecx, [esp + 0x24]
push 0
push ecx
mov word [0x430b20], 0x100
mov eax, dword [edx + 4]
push 0xc
mov ebp, 3
push 0x430b20
push esi
mov dword [0x430b28], eax
mov word [0x430b22], bp
mov dword [0x430b24], 1
call edi
mov edx, dword [esp + 0x28]
lea ecx, [esp + 0x24]
push 0
push ecx
mov word [0x430b20], 0x101
mov eax, dword [edx + 8]
push 0xc
push 0x430b20
push esi
mov dword [0x430b28], eax
mov word [0x430b22], bp
mov dword [0x430b24], 1
call edi
lea ebx, [ebx + ebx*2]
lea edx, [esp + 0x24]
shl ebx, 2
push 0
mov word [0x430b20], 0x102
lea eax, [ebx + 0x12]
mov word [0x430b22], bp
mov dword [esp + 0x1c], eax
mov dword [0x430b28], eax
mov dword [0x430b24], ebp
push edx
push 0xc
push 0x430b20
push esi
call edi
mov eax, 1
push 0
mov dword [0x430b28], eax
mov dword [0x430b24], eax
lea eax, [esp + 0x28]
mov word [0x430b20], 0x103
push eax
push 0xc
push 0x430b20
push esi
mov word [0x430b22], bp
call edi
lea ecx, [esp + 0x24]
push 0
push ecx
push 0xc
push 0x430b20
push esi
mov word [0x430b20], 0x106
mov dword [0x430b28], 2
mov word [0x430b22], bp
mov dword [0x430b24], 1
call edi
lea edx, [esp + 0x24]
push 0
push edx
push 0xc
mov eax, 1
push 0x430b20
push esi
mov word [0x430b20], 0x10a
mov dword [0x430b28], eax
mov word [0x430b22], bp
mov dword [0x430b24], eax
call edi
mov eax, dword [esp + 0x18]
push 0
add eax, 6
mov word [0x430b20], 0x111
mov dword [0x430b28], eax
lea eax, [esp + 0x28]
push eax
push 0xc
push 0x430b20
push esi
mov word [0x430b22], 4
mov dword [0x430b24], 1
call edi
lea ecx, [esp + 0x24]
push 0
push ecx
push 0xc
push 0x430b20
push esi
mov word [0x430b20], 0x115
mov dword [0x430b28], ebp
mov word [0x430b22], bp
mov dword [0x430b24], 1
call edi
lea edx, [esp + 0x24]
add ebx, 0xa
push 0
push edx
mov dword [0x430b28], ebx
push 0xc
mov ebx, 1
push 0x430b20
push esi
mov word [0x430b20], 0x11a
mov word [0x430b22], 5
mov dword [0x430b24], ebx
call edi
lea eax, [esp + 0x24]
push 0
push eax
mov word [0x430b20], 0x11b
push 0xc
push 0x430b20
push esi
call edi
lea ecx, [esp + 0x24]
push 0
push ecx
lea edx, [esp + 0x1c]
push 4
push edx
push esi
mov dword [esp + 0x28], 0x64
call edi
lea eax, [esp + 0x24]
push 0
push eax
lea ecx, [esp + 0x1c]
push 4
push ecx
push esi
mov dword [esp + 0x28], ebx
call edi
mov dword [esp + 0x10], 8
lea edx, [esp + 0x24]
push 0
push edx
lea eax, [esp + 0x18]
push 2
push eax
push esi
call edi
dec ebp
jne 0x4175eb
mov eax, dword [esp + 0x28]
mov ebx, dword [eax + 8]
mov eax, dword [eax + 4]
mov dword [esp + 0x28], ebx
lea edx, [eax + eax*2]
mov dword [esp + 0x18], edx
lea ecx, [edx + 3]
and ecx, 0xfffc
test ebx, ebx
jle 0x417680
mov eax, 0x55555556
imul edx
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, ecx
neg eax
dec ebx
mov dword [esp + 0x1c], eax
imul ebx, ecx
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x28]
mov ebp, edx
add ebx, eax
mov dword [esp + 0x28], ecx
push ebp
push ebx
call fcn.00416710
mov eax, dword [esp + 0x20]
add esp, 8
lea edx, [esp + 0x24]
push 0
push edx
push eax
push ebx
push esi
call edi
push ebp
push ebx
call fcn.00416710
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x30]
add esp, 8
add ebx, ecx
dec eax
mov dword [esp + 0x28], eax
jne 0x41764b
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x10
ret