Function at 0x406b70
Capabilities:
Write file on windows

Disassembly:
mov eax, 0x42c4
call fcn.00413180
mov eax, dword [0x464380]
xor eax, esp
mov dword [esp + 0x42c0], eax
mov eax, dword [esp + 0x42d0]
push ebx
push ebp
mov ebp, dword [esp + 0x42d0]
push esi
mov esi, dword [esp + 0x42d8]
push edi
push 0x1f4
mov dword [esp + 0x50], ebp
mov dword [esp + 0x48], eax
xor ebx, ebx
xor edi, edi
call fcn.00412195
mov dword [esp + 0x44], eax
mov eax, ebp
add esp, 4
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x406bc3
sub eax, edx
sar eax, 1
movzx ecx, ax
push 0x45739c
push esi
mov dword [esp + 0x38], ecx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x20], 0x401010
mov dword [esp + 0x24], 0x401000
mov dword [esp + 0x40], 0x401010
mov dword [esp + 0x44], 0x401000
call fcn.00412429
add esp, 8
cmp eax, ebx
mov dword [esp + 0x58], eax
jne 0x406c26
call fcn.00412321
cmp dword [eax], ebx
je 0x406c26
mov eax, 1
jmp 0x406f75
lea edx, [esp + 0x50]
mov dword [esp + 0x50], 0x401110
mov dword [esp + 0x54], 0x401160
mov dword [esp + 0xac], 0x401210
mov dword [esp + 0xb0], 0x401270
mov dword [esp + 0xb4], 0x401280
mov dword [esp + 0xb8], 0x4012e0
mov dword [esp + 0xbc], edx
mov dword [esp + 0xc4], ebx
mov dword [esp + 0xc0], ebx
call fcn.004058f0
lea eax, [esp + 0xac]
push eax
lea ecx, [esp + 0x60]
push ecx
lea edx, [esp + 0x40]
lea ecx, [esp + 0x20]
mov dword [esp + 0x64], ebx
mov dword [esp + 0x68], ebx
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x70], ebx
mov dword [esp + 0x74], ebx
mov dword [esp + 0x78], ebx
mov dword [esp + 0x7c], ebx
mov dword [esp + 0x80], ebx
mov dword [esp + 0x94], ebx
mov dword [esp + 0x98], ebx
mov dword [esp + 0x9c], ebx
mov dword [esp + 0xa0], ebx
mov dword [esp + 0xa4], ebx
mov dword [esp + 0xa8], ebx
mov dword [esp + 0xac], ebx
call fcn.00406530
add esp, 8
cmp eax, ebx
je 0x406d09
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x60]
push eax
call fcn.00401c40
jmp 0x406f47
xor ebp, ebp
cmp dword [esp + 0x78], ebx
mov dword [esp + 0x34], 0xffffffff
mov dword [esp + 0x14], ebx
mov dword [esp + 0x48], ebx
jbe 0x406f39
mov ecx, dword [esp + 0x6c]
mov dword [esp + 0x10], ecx
lea ecx, [ecx]
mov eax, dword [esp + 0x44]
cmp eax, ebx
je 0x406d46
mov edx, dword [esp + 0x78]
push edx
lea ecx, [ebp + 1]
push ecx
call eax
add esp, 8
mov eax, dword [esp + 0x9c]
mov esi, dword [eax + ebp*4 + 4]
sub esi, dword [eax + ebp*4]
mov dword [esp + 0x2c], ebx
cmp esi, dword [esp + 0x28]
mov dword [esp + 0x20], ebx
jbe 0x406d8d
push edi
call fcn.00412258
lea eax, [esi + esi]
add esp, 4
cmp eax, ebx
mov dword [esp + 0x28], esi
je 0x406f8e
push eax
call fcn.00412195
mov edi, eax
add esp, 4
cmp edi, ebx
je 0x406f39
push edi
lea edx, [esp + 0x60]
push ebp
push edx
call fcn.00403420
mov eax, dword [esp + 0x1c]
add esp, 0xc
cmp byte [eax + 0x19], bl
jne 0x406de9
lea ecx, [esp + 0x38]
push ecx
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x38]
push ecx
lea edx, [esp + 0x58]
push edx
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x4c]
push ecx
push ebp
lea edx, [esp + 0xcc]
push edx
lea eax, [esp + 0x80]
push eax
call fcn.00406930
add esp, 0x28
test eax, eax
jne 0x406f39
mov esi, dword [esp + 0x40]
push 0x1f4
push ebx
push esi
call fcn.00413010
mov eax, dword [esp + 0x58]
mov edx, esi
add esp, 0xc
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
cmp cx, bx
jne 0x406e04
xor edx, edx
cmp word [edi], bx
je 0x406e43
movzx ecx, word [esp + 0x30]
mov eax, edi
lea ecx, [esi + ecx*2]
cmp word [eax], 0x2f
jne 0x406e2f
mov word [eax], 0x5c
mov ax, word [eax]
mov word [ecx], ax
add edx, 1
lea eax, [edi + edx*2]
add ecx, 2
cmp word [eax], bx
jne 0x406e24
push esi
call fcn.0040acb0
mov ecx, dword [esp + 0x14]
add esp, 4
cmp byte [ecx + 0x19], bl
jne 0x406f0a
lea edx, [esp + 0x24]
push edx
mov eax, esi
call fcn.00405880
add esp, 4
test eax, eax
je 0x406ec8
push 0x206
lea eax, [esp + 0x40ce]
push ebx
push eax
mov word [esp + 0x40d4], bx
call fcn.00413010
lea edx, [esp + 0x40d4]
add esp, 0xc
mov eax, esi
sub edx, esi
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
cmp cx, bx
jne 0x406e95
lea ecx, [esp + 0x40c8]
push ecx
call fcn.0040b0b0
lea edx, [esp + 0x28]
push edx
mov eax, esi
call fcn.00405880
add esp, 8
test eax, eax
jne 0x406f92
mov eax, dword [esp + 0x20]
cmp eax, ebx
mov esi, dword [esp + 0x24]
je 0x406ef1
mov ecx, dword [esp + 0x14]
push esi
push eax
mov eax, dword [esp + 0x34]
add eax, ecx
push 1
push eax
call fcn.004128ec
add esp, 0x10
cmp eax, dword [esp + 0x20]
jne 0x406f1e
cmp esi, ebx
je 0x406f0a
push esi
call fcn.004124af
add esp, 4
cmp eax, ebx
jne 0x406f99
mov dword [esp + 0x24], ebx
add dword [esp + 0x10], 0x20
add ebp, 1
cmp ebp, dword [esp + 0x78]
jb 0x406d30
jmp 0x406f39
push esi
call fcn.0041252b
add esp, 4
push str.can_not_write_output_file
push str._nERROR:__s_n
call fcn.004130af
add esp, 8
mov edx, dword [esp + 0x14]
push edx
lea eax, [esp + 0x1c]
push eax
call dword [esp + 0x24]
add esp, 8
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x60]
push edx
call fcn.00401c40
push edi
call fcn.00412258
mov eax, dword [esp + 0x64]
add esp, 0xc
cmp eax, ebx
je 0x406f73
push eax
call fcn.004124af
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x42d0]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00412ff5
add esp, 0x42c4
ret
xor edi, edi
jmp 0x406f39
push str.can_not_open_output_file
jmp 0x406f2c
push str.can_not_close_output_file
jmp 0x406f2c