Function at 0x406e90
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x234
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, ecx
push edi
mov dword [ebp - 0x210], eax
xor edi, edi
mov dword [ebp - 0x22c], 0
mov dword [ebp - 0x218], 0
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x224], 0
mov dword [ebp - 0x214], 0xffffffff
mov dword [ebp - 0x20c], 0
mov eax, 0x426be4
mov ecx, esi
nop dword [eax]
mov dx, word [ecx]
cmp dx, word [eax]
jne 0x406f26
test dx, dx
je 0x406f22
mov dx, word [ecx + 2]
cmp dx, word [eax + 2]
jne 0x406f26
add ecx, 4
add eax, 4
test dx, dx
jne 0x406f00
xor eax, eax
jmp 0x406f2b
sbb eax, eax
or eax, 1
test eax, eax
jne 0x406f9f
mov esi, dword [ebx + 0x570]
mov ecx, 0x426bec
add esi, 0x38
add esi, edi
mov eax, esi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x406f67
test dx, dx
je 0x406f63
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x406f67
add eax, 4
add ecx, 4
test dx, dx
jne 0x406f41
xor eax, eax
jmp 0x406f6c
sbb eax, eax
or eax, 1
test eax, eax
je 0x406f7e
push dword [ebp - 0x210]
mov ecx, ebx
push esi
call fcn.00406e90
mov esi, dword [ebp + 8]
mov edx, dword [ebp - 0x20c]
sub edi, 0xffffff80
inc edx
mov dword [ebp - 0x20c], edx
cmp edi, 0x4000
jb 0x406ef2
jmp 0x407004
mov eax, dword [ebx + 0x570]
mov ecx, esi
add eax, 0x38
add eax, edi
nop dword [eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x406fd6
test dx, dx
je 0x406fd2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x406fd6
add eax, 4
add ecx, 4
test dx, dx
jne 0x406fb0
xor eax, eax
jmp 0x406fdb
sbb eax, eax
or eax, 1
test eax, eax
jne 0x406f81
mov edx, dword [ebp - 0x20c]
mov ecx, edx
mov eax, dword [ebx + 0x570]
shl ecx, 7
mov esi, dword [eax + ecx + 0x20]
mov eax, dword [eax + ecx + 0x28]
mov dword [ebp - 0x218], esi
mov dword [ebp - 0x220], eax
cmp edx, 0x80
je 0x4072ae
mov esi, dword [ebx + 0x570]
mov ecx, str.CrashDump
shl edx, 7
add esi, 0x38
add esi, edx
mov eax, esi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40704b
test dx, dx
je 0x407047
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40704b
add eax, 4
add ecx, 4
test dx, dx
jne 0x407025
xor eax, eax
jmp 0x407050
sbb eax, eax
or eax, 1
test eax, eax
je 0x4072ae
push esi
push dword [ebp - 0x210]
lea eax, [ebp - 0x208]
push str._s_s.bin
push eax
call fcn.004072d0
xor esi, esi
add esp, 0x10
mov dword [ebp - 0x228], esi
cmp dword [ebx + 0x108], esi
jbe 0x407256
xor ecx, ecx
mov dword [ebp - 0x230], ecx
nop
add ecx, dword [ebx + 0x134]
cmp dword [ecx + 4], 0
je 0x407222
mov edi, dword [ebx + 0x104]
mov eax, edi
mul dword [ecx + 0xc]
mov dword [ebp - 0x21c], eax
mov ecx, eax
mov eax, edx
mov dword [ebp - 0x210], edx
shrd ecx, eax, 9
shr eax, 9
test eax, eax
jb 0x407222
ja 0x407222
cmp ecx, dword [ebp - 0x218]
jb 0x407222
test eax, eax
ja 0x407222
jb 0x4070f2
cmp ecx, dword [ebp - 0x220]
ja 0x407222
push edi
call fcn.0040b54a
add esp, 4
mov dword [ebp - 0x234], eax
test eax, eax
je 0x407296
push dword [ebx + 0x154]
imul edi, esi
lea esi, [ebx + 0x144]
mov dword [ebp - 0x20c], edi
xor edi, edi
mov eax, dword [ebp - 0x20c]
add eax, dword [ebx + 0x138]
mov dword [ebp - 0x20c], eax
adc edi, dword [ebx + 0x13c]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov eax, dword [ebp - 0x20c]
mov dword [esi + 8], eax
lea eax, [ebp - 0x22c]
push esi
push eax
mov dword [esi + 0xc], edi
push dword [ebx + 0x104]
mov edi, dword [ebp - 0x234]
push edi
push dword [ebx + 0x140]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x407288
cmp dword [ebp - 0x214], 0xffffffff
jne 0x4071be
lea eax, [ebp - 0x208]
push eax
push str.Exporting_file:__s_n
call fcn.0040b76b
add esp, 8
lea eax, [ebp - 0x208]
push 0
push 0x80
push 2
push 0
push 0
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x214], eax
cmp eax, 0xffffffff
je 0x40726f
mov eax, dword [ebp - 0x218]
lea esi, [ebx + 0x158]
push dword [esi + 0x10]
mov ecx, 0x200
mul ecx
sub dword [ebp - 0x21c], eax
sbb dword [ebp - 0x210], edx
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov eax, dword [ebp - 0x21c]
mov dword [esi + 8], eax
mov eax, dword [ebp - 0x210]
push esi
mov dword [esi + 0xc], eax
lea eax, [ebp - 0x22c]
push eax
push dword [ebx + 0x104]
push edi
push dword [ebp - 0x214]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call fcn.0040b512
mov esi, dword [ebp - 0x228]
add esp, 4
mov ecx, dword [ebp - 0x230]
inc esi
add ecx, 0x10
mov dword [ebp - 0x228], esi
mov dword [ebp - 0x230], ecx
cmp esi, dword [ebx + 0x108]
jb 0x407090
mov eax, dword [ebp - 0x214]
cmp eax, 0xffffffff
je 0x407256
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x224]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040b4d0
mov esp, ebp
pop ebp
ret 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040b4d0
mov esp, ebp
pop ebp
ret 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x224], eax
jmp 0x407244
mov eax, 0xe
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040b4d0
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040b4d0
mov esp, ebp
pop ebp
ret 8