Function at 0x413be0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x158
mov eax, dword [esp + 0x160]
push ebx
push ebp
xor ebp, ebp
push esi
cmp eax, ebp
push edi
mov dword [esp + 0x28], ecx
jne 0x413c0a
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x158
ret 0x10
mov bx, word [esp + 0x174]
cmp bx, bp
jg 0x413c26
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x158
ret 0x10
mov eax, dword [esp + 0x16c]
cmp eax, ebp
jne 0x413c40
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x158
ret 0x10
push ebp
push 0x80
push 2
push ebp
push ebp
push 0x40000000
push eax
mov dword [esp + 0x2c], ebp
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
mov dword [esp + 0x18], esi
jne 0x413c74
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x158
ret 0x10
lea eax, [esp + 0x10]
push ebp
push eax
lea ecx, [esp + 0x1e]
push 2
push ecx
push esi
mov byte [esp + 0x2a], 0xff
mov byte [esp + 0x2b], 0xfe
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x413cac
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x158
ret 0x10
movsx eax, bx
cdq
mov ebx, edx
xor edi, edi
test ebx, ebx
mov dword [esp + 0x20], eax
jl 0x413d4c
jg 0x413cca
test eax, eax
jbe 0x413d4c
mov edx, dword [esp + 0x170]
mov ecx, dword [esp + 0x28]
add ecx, 0xd2c
mov eax, dword [edx + edi*4]
push eax
call fcn.0040e100
mov esi, eax
test esi, esi
je 0x413d36
lea edx, [esp + 0x10]
push 0
push edx
push esi
call fcn.00432a93
add esp, 4
shl eax, 1
push eax
push esi
mov esi, dword [esp + 0x28]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x413c96
movsx eax, word [esp + 0x174]
dec eax
cdq
cmp ebp, edx
jg 0x413d36
jl 0x413d21
cmp edi, eax
jae 0x413d36
lea eax, [esp + 0x10]
push 0
push eax
push 2
push 0x462d14
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
add edi, 1
adc ebp, 0
cmp ebp, ebx
jl 0x413cca
jg 0x413d48
cmp edi, dword [esp + 0x20]
jb 0x413cca
mov esi, dword [esp + 0x18]
lea ecx, [esp + 0x10]
push 0
push ecx
push 4
push 0x462398
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ebp, dword [esp + 0x28]
mov ecx, ebp
call fcn.0040d0c0
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x178]
xor ebx, ebx
mov dword [esp + 0x30], edx
cmp eax, ebx
je 0x413d98
push ebx
push ebx
push 0x1004
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
cdq
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], edx
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x6a]
mov word [esp + 0x68], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, 0xc
xor eax, eax
lea edi, [esp + 0x38]
mov dword [esp + 0x20], ebx
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x30]
xor ecx, ecx
test eax, eax
mov dword [esp + 0x34], 4
mov dword [esp + 0x24], ecx
jl 0x41405b
jg 0x413de5
mov eax, dword [esp + 0x2c]
test eax, eax
jbe 0x41405b
mov eax, dword [esp + 0x178]
test eax, eax
je 0x413e18
lea edx, [esp + 0x34]
mov dword [esp + 0x38], ebx
push edx
push 0
push 0x104b
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
test eax, eax
je 0x414031
mov eax, dword [esp + 0x54]
cdq
push edx
push eax
jmp 0x413e1a
push ecx
push ebx
mov ecx, ebp
call fcn.0040df60
mov edi, eax
test edi, edi
je 0x414031
mov al, byte [edi + 0x478]
test al, al
jne 0x414031
mov bx, word [esp + 0x174]
xor eax, eax
test bx, bx
mov dword [esp + 0x1c], eax
jle 0x414018
mov ecx, dword [esp + 0x170]
movsx eax, ax
mov eax, dword [ecx + eax*4]
cmp eax, 9
ja case.default.0x413e66
jmp dword [eax*4 + 0x41408c]
lea esi, [edi + 0x2c]
jmp 0x413fa3
mov dl, byte [edi]
mov eax, dword [edi + 0x20]
mov ecx, dword [edi + 0x1c]
test dl, 0x10
je 0x413e8c
mov edx, eax
or edx, ecx
je case.default.0x413e66
push ecx
push eax
lea eax, [esp + 0x70]
push str._I64d
push eax
call fcn.004330f8
lea ecx, [esp + 0x78]
lea esi, [esp + 0x78]
push ecx
call fcn.00432a93
add esp, 0x14
jmp 0x413fac
mov edx, dword [edi + 0x468]
lea ecx, [ebp + 0xc88]
push edx
call fcn.0040d5a0
mov esi, eax
test esi, esi
je 0x413fd2
jmp 0x413fa3
mov eax, dword [edi + 0x468]
lea ecx, [ebp + 0xc88]
push eax
call fcn.0040d5d0
mov esi, eax
test esi, esi
je 0x413fd2
jmp 0x413fa3
lea ecx, [esp + 0x68]
push 0x80
push ecx
lea edx, [edi + 0x14]
push 1
push edx
call fcn.0040b430
lea eax, [esp + 0x78]
lea esi, [esp + 0x78]
push eax
call fcn.00432a93
add esp, 0x14
jmp 0x413fac
lea ecx, [esp + 0x68]
push 0x80
push ecx
lea edx, [edi + 4]
push 1
push edx
call fcn.0040b430
lea eax, [esp + 0x78]
lea esi, [esp + 0x78]
push eax
call fcn.00432a93
add esp, 0x14
jmp 0x413fac
lea ecx, [esp + 0x68]
push 0x80
push ecx
lea edx, [edi + 0xc]
push 1
push edx
call fcn.0040b430
lea eax, [esp + 0x78]
lea esi, [esp + 0x78]
push eax
call fcn.00432a93
add esp, 0x14
jmp 0x413fac
lea esi, [edi + 0x250]
jmp 0x413fa3
mov edx, dword [edi]
lea ecx, [esp + 0x68]
push 0x80
push ecx
push edx
call fcn.0040b500
lea eax, [esp + 0x74]
lea esi, [esp + 0x74]
push eax
call fcn.00432a93
add esp, 0x10
jmp 0x413fac
lea esi, [edi + 0x234]
push esi
call fcn.00432a93
add esp, 4
shl eax, 1
test esi, esi
je 0x413fd2
test eax, eax
je 0x413fd2
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x10]
push 0
push ecx
push eax
push esi
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x414071
mov esi, dword [esp + 0x18]
mov ebp, dword [esp + 0x28]
mov bx, word [esp + 0x174]
movsx eax, bx
lea ecx, [eax - 1]
movsx eax, word [esp + 0x1c]
cmp eax, ecx
jge 0x414006
lea edx, [esp + 0x10]
push 0
push edx
push 2
push 0x462d14
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x1c]
inc eax
cmp ax, bx
mov dword [esp + 0x1c], eax
jl 0x413e50
lea eax, [esp + 0x10]
push 0
push eax
push 4
push 0x462398
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x30]
add ebx, 1
adc ecx, 0
mov dword [esp + 0x20], ebx
cmp ecx, eax
mov dword [esp + 0x24], ecx
jl 0x413de5
jg 0x41405b
cmp ebx, dword [esp + 0x2c]
jb 0x413de5
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x158
ret 0x10
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x158
ret 0x10