Function at 0x402be0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x420318
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x427138]
xor eax, esp
mov dword [esp + 0x30], eax
push ebx
push esi
push edi
mov eax, dword [0x427138]
xor eax, esp
push eax
lea eax, [esp + 0x48]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
mov edx, ecx
mov dword [esp + 0x14], edx
cmp ebx, 0xffffffff
jne 0x402c2c
xor eax, eax
jmp 0x402ff7
mov eax, dword [edx + 0x24]
mov ecx, dword [eax]
test ecx, ecx
je 0x402c55
mov eax, dword [edx + 0x34]
mov esi, dword [eax]
add esi, ecx
cmp ecx, esi
jae 0x402c55
dec dword [eax]
mov eax, dword [edx + 0x24]
mov ecx, dword [eax]
lea edx, [ecx + 1]
mov dword [eax], edx
mov byte [ecx], bl
mov eax, ebx
jmp 0x402ff7
mov eax, dword [edx + 0x4c]
test eax, eax
je 0x402ff4
cmp dword [edx + 0x3c], 0
jne 0x402c83
push eax
movsx eax, bl
push eax
call fcn.00409dc1
add esp, 8
cmp eax, 0xffffffff
je 0x402ff4
mov eax, ebx
jmp 0x402ff7
lea esi, [esp + 0x24]
mov byte [esp + 0x13], bl
call fcn.004038e0
mov dword [esp + 0x50], 0
mov ecx, dword [esp + 0x3c]
mov edi, dword [esp + 0x38]
mov eax, dword [esp + 0x28]
cmp ecx, 0x10
jb 0x402f67
mov esi, eax
mov dword [esp + 0x18], esi
test eax, eax
je 0x402cd7
mov edx, eax
cmp ecx, 0x10
jae 0x402cc2
lea edx, [esp + 0x28]
cmp edx, esi
ja 0x402cd7
mov edx, eax
cmp ecx, 0x10
jae 0x402cd1
lea edx, [esp + 0x28]
add edx, edi
cmp esi, edx
jbe 0x402ce8
call fcn.0040a5b8
mov ecx, dword [esp + 0x3c]
mov edi, dword [esp + 0x38]
mov eax, dword [esp + 0x28]
lea edx, [esp + 0x24]
cmp edx, 0xfffffffc
je 0x402d13
mov edx, eax
cmp ecx, 0x10
jae 0x402cfc
lea edx, [esp + 0x28]
add edx, edi
cmp esi, edx
jb 0x402d13
call fcn.0040a5b8
mov ecx, dword [esp + 0x3c]
mov edi, dword [esp + 0x38]
mov eax, dword [esp + 0x28]
mov ebx, edi
cmp ecx, 0x10
jb 0x402f74
mov esi, eax
test eax, eax
je 0x402d44
mov edx, eax
cmp ecx, 0x10
jae 0x402d2f
lea edx, [esp + 0x28]
cmp edx, esi
ja 0x402d44
mov edx, eax
cmp ecx, 0x10
jae 0x402d3e
lea edx, [esp + 0x28]
add edx, edi
cmp esi, edx
jbe 0x402d55
call fcn.0040a5b8
mov ecx, dword [esp + 0x3c]
mov edi, dword [esp + 0x38]
mov eax, dword [esp + 0x28]
lea edx, [esp + 0x24]
cmp edx, 0xfffffffc
je 0x402d72
cmp ecx, 0x10
jae 0x402d67
lea eax, [esp + 0x28]
add eax, edi
cmp esi, eax
jb 0x402d72
call fcn.0040a5b8
mov edi, dword [esp + 0x14]
mov ecx, dword [edi + 0x3c]
mov edx, dword [ecx]
mov edx, dword [edx + 0x14]
lea eax, [esp + 0x20]
push eax
mov eax, dword [esp + 0x1c]
add eax, ebx
push eax
push esi
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x27]
push eax
lea eax, [edi + 0x44]
push eax
call edx
test eax, eax
jl 0x402feb
cmp eax, 1
jg 0x402fa8
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x28]
cmp ecx, 0x10
jb 0x402f7d
mov esi, eax
test eax, eax
je 0x402dec
mov edx, eax
cmp ecx, 0x10
jae 0x402dd3
lea edx, [esp + 0x28]
cmp edx, esi
ja 0x402dec
mov edx, eax
cmp ecx, 0x10
jae 0x402de2
lea edx, [esp + 0x28]
mov edi, dword [esp + 0x38]
add edx, edi
cmp esi, edx
jbe 0x402dfd
call fcn.0040a5b8
mov ecx, dword [esp + 0x3c]
mov edi, dword [esp + 0x38]
mov eax, dword [esp + 0x28]
lea edx, [esp + 0x24]
cmp edx, 0xfffffffc
je 0x402e28
mov edx, eax
cmp ecx, 0x10
jae 0x402e11
lea edx, [esp + 0x28]
add edx, edi
cmp esi, edx
jb 0x402e28
call fcn.0040a5b8
mov ecx, dword [esp + 0x3c]
mov edi, dword [esp + 0x38]
mov eax, dword [esp + 0x28]
mov ebx, dword [esp + 0x20]
sub ebx, esi
je 0x402eb9
cmp ecx, 0x10
jb 0x402f86
mov esi, eax
test eax, eax
je 0x402e63
mov edx, eax
cmp ecx, 0x10
jae 0x402e4e
lea edx, [esp + 0x28]
cmp edx, esi
ja 0x402e63
mov edx, eax
cmp ecx, 0x10
jae 0x402e5d
lea edx, [esp + 0x28]
add edx, edi
cmp esi, edx
jbe 0x402e74
call fcn.0040a5b8
mov ecx, dword [esp + 0x3c]
mov edi, dword [esp + 0x38]
mov eax, dword [esp + 0x28]
lea edx, [esp + 0x24]
cmp edx, 0xfffffffc
je 0x402e91
cmp ecx, 0x10
jae 0x402e86
lea eax, [esp + 0x28]
add eax, edi
cmp esi, eax
jb 0x402e91
call fcn.0040a5b8
mov eax, dword [esp + 0x14]
mov ecx, dword [eax + 0x4c]
push ecx
push ebx
push 1
push esi
call fcn.0040a833
add esp, 0x10
cmp ebx, eax
jne 0x402feb
mov ecx, dword [esp + 0x3c]
mov edi, dword [esp + 0x38]
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x14]
mov byte [edx + 0x41], 1
lea edx, [esp + 0x13]
cmp dword [esp + 0x1c], edx
jne 0x402fdd
test ebx, ebx
ja 0x402ca4
cmp edi, 0x20
jae 0x402feb
or edx, 0xffffffff
sub edx, edi
cmp edx, 8
ja 0x402efb
call fcn.0040912a
mov ecx, dword [esp + 0x3c]
mov edi, dword [esp + 0x38]
mov eax, dword [esp + 0x28]
lea esi, [edi + 8]
cmp esi, 0xfffffffe
jbe 0x402f14
call fcn.0040912a
mov ecx, dword [esp + 0x3c]
mov edi, dword [esp + 0x38]
mov eax, dword [esp + 0x28]
cmp ecx, esi
jae 0x402f8f
push edi
push esi
lea ecx, [esp + 0x2c]
call fcn.00404770
mov ecx, dword [esp + 0x3c]
mov edi, dword [esp + 0x38]
mov eax, dword [esp + 0x28]
test esi, esi
jbe 0x402ca4
cmp ecx, 0x10
mov ecx, eax
jae 0x402f42
lea ecx, [esp + 0x28]
xor eax, eax
add ecx, edi
mov dword [ecx], eax
mov dword [ecx + 4], eax
cmp dword [esp + 0x3c], 0x10
mov eax, dword [esp + 0x28]
mov dword [esp + 0x38], esi
jae 0x402f5e
lea eax, [esp + 0x28]
mov byte [eax + esi], 0
jmp 0x402c98
lea esi, [esp + 0x28]
mov dword [esp + 0x18], esi
jmp 0x402cb7
lea esi, [esp + 0x28]
jmp 0x402d24
lea esi, [esp + 0x28]
jmp 0x402dc8
lea esi, [esp + 0x28]
jmp 0x402e43
test esi, esi
jne 0x402f31
mov dword [esp + 0x38], esi
cmp ecx, 0x10
jae 0x402fa0
lea eax, [esp + 0x28]
mov byte [eax], 0
jmp 0x402c98
cmp eax, 3
jne 0x402feb
mov eax, dword [edi + 0x4c]
mov cl, byte [esp + 0x13]
call fcn.00402120
test al, al
je 0x402fcd
mov esi, dword [ebp + 8]
lea ecx, [esp + 0x24]
call fcn.00402700
mov eax, esi
jmp 0x402ff7
lea ecx, [esp + 0x24]
or esi, 0xffffffff
call fcn.00402700
mov eax, esi
jmp 0x402ff7
lea ecx, [esp + 0x24]
call fcn.00402700
mov eax, dword [ebp + 8]
jmp 0x402ff7
lea ecx, [esp + 0x24]
call fcn.00402700
or eax, 0xffffffff
mov ecx, dword [esp + 0x48]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.00409a6d
mov esp, ebp
pop ebp
ret 4