Function at 0x412510
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x7c
test eax, eax
js 0x4124a6
je 0x412420
cmp eax, 0x7ff
ja 0x412430
mov eax, dword [0x42d53c]
test eax, eax
jne 0x4123b8
mov eax, dword [0x422054]
mov edx, dword [ebx*4 + 0x42e568]
lea ecx, [eax + edx*4]
mov eax, dword [ecx]
test eax, eax
je 0x412443
mov ebx, dword [eax]
lea edx, [edx*8]
mov dword [ecx], ebx
mov dword [eax], 0
add dword [0x42d7a4], edx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], 0x42d08c
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x422054]
mov edx, dword [ebx*4 + 0x42e568]
mov esi, dword [0x42d53c]
sub esp, 4
lea ecx, [eax + edx*4]
mov eax, dword [ecx]
test eax, eax
je 0x412490
mov ebx, dword [eax]
lea edx, [edx*8]
mov dword [ecx], ebx
mov dword [eax], 0
add dword [0x42d7a4], edx
test esi, esi
je 0x4123ad
mov dword [ebp - 0x6c], eax
mov dword [esp], 0x42d08c
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 0x6c]
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, 0x800
sub eax, dword [0x42d764]
cmp eax, ebx
jae 0x412374
mov edx, 1
mov eax, ebx
call fcn.0040d740
mov dword [ebp - 0x58], ebp
mov ecx, dword [ebp - 0x58]
mov edx, 1
lock xadd dword [0x44c410], edx
imul edx, edx, 0xc4ec4ec5
cmp edx, 0x13b13b13
ja 0x4123ad
lea esp, [ebp - 0xc]
lea edx, [ecx - 0x2000]
pop ebx
and edx, 0xfffffff0
pop esi
pop edi
pop ebp
jmp fcn.004026f0
test esi, esi
je 0x412443
mov dword [esp], 0x42d08c
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
jmp 0x412443
lea edx, [ebp - 0x40]
xor eax, eax
mov ecx, 0xa
mov edi, edx
lea edx, [ebp - 0x58]
rep stosd dword es:[edi], eax
mov dword [ebp - 0x48], ebx
lea eax, [ebp - 0x64]
sar ebx, 0x1f
mov dword [ebp - 0x58], str.calloc_
mov dword [ebp - 0x54], 7
mov dword [ebp - 0x50], 1
mov dword [ebp - 0x4c], 0xfe09
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x38], str.___0_
mov dword [ebp - 0x34], 5
mov dword [ebp - 0x30], 1
call fcn.00411640
mov eax, dword [ebp - 0x64]
mov edx, dword [ebp - 0x60]
mov ecx, dword [ebp - 0x5c]
call fcn.00411770
lea esi, cs:[esi]
nop
push ebp
push edi
push esi
push ebx
sub esp, 0x7c
mov eax, dword [esp + 0x90]
mov eax, dword [eax]
mov edx, dword [eax]
lea eax, [edx - 0x40010006]
and eax, 0xfffffffb
je 0x41263c
cmp edx, 0xe06d7363
je 0x41263c
xor eax, eax
lea edi, [esp + 0x44]
mov ecx, 0xb
mov dword [esp + 0x40], edx
rep stosd dword es:[edi], eax
lea edx, [esp + 0x30]
lea eax, [esp + 0x18]
mov dword [esp + 0x30], str.Unhandled_Exception_0x
mov dword [esp + 0x34], 0x16
mov dword [esp + 0x38], 1
mov dword [esp + 0x3c], 0x7000fe86
mov dword [esp + 0x50], 0x4264d7
mov dword [esp + 0x58], 1
call fcn.00411640
mov ebp, dword [esp + 0x18]
test ebp, ebp
je 0x412650
mov edi, dword [esp + 0x1c]
mov esi, dword [fcn.00420f08]
mov byte [esp + 0x24], 0xa
test edi, edi
jle 0x4125d8
mov dword [esp], 1
call esi
mov ebx, eax
lea esi, [esi]
mov dword [esp + 8], edi
mov dword [esp], ebp
mov dword [esp + 0xc], ebx
mov dword [esp + 4], 1
call sub.msvcrt.dll_fwrite
sub edi, eax
add ebp, eax
test edi, edi
jg 0x4125b8
mov dword [esp], 1
lea edi, [esp + 0x24]
mov ebx, 1
call esi
mov esi, eax
lea esi, [esi]
mov dword [esp + 8], ebx
mov dword [esp], edi
mov dword [esp + 0xc], esi
mov dword [esp + 4], 1
call sub.msvcrt.dll_fwrite
sub ebx, eax
add edi, eax
test ebx, ebx
jg 0x4125f0
mov eax, str.print_backtrace_skipping_top_frames_is_not_implemented
mov edx, 0x36
mov ecx, 1
mov dword [esp + 0x24], str.print_backtrace_skipping_top_frames_is_not_implemented
mov dword [esp + 0x28], 0x36
mov dword [esp + 0x2c], 1
call fcn.0040bf70
add esp, 0x7c
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret 4
mov byte [esp + 0x24], 0xa
mov ebp, str.println_NIL_
mov edi, 0xc
mov esi, dword [fcn.00420f08]
mov dword [esp], 1
call esi
mov ebx, eax
mov dword [esp + 8], edi
mov dword [esp], ebp
mov dword [esp + 0xc], ebx
mov dword [esp + 4], 1
call sub.msvcrt.dll_fwrite
sub edi, eax
add ebp, eax
test edi, edi
jg 0x412670
mov dword [esp], 1
lea edi, [esp + 0x24]
mov ebx, 1
call esi
mov esi, eax
lea esi, [esi]
mov dword [esp + 8], ebx
mov dword [esp], edi
mov dword [esp + 0xc], esi
mov dword [esp + 4], 1
call sub.msvcrt.dll_fwrite
sub ebx, eax
add edi, eax
test ebx, ebx
jg 0x4126a8
jmp 0x412610