Function at 0x101dacc0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x18
push esi
mov esi, dword [esp + 0x30]
push esi
call dword [sym.imp.MSVCR110.dll_ftell]
add esp, 4
test eax, eax
jns 0x101dacfa
call dword [sym.imp.MSVCR110.dll__errno]
push dword [eax]
mov eax, dword [esp + 0x24]
add eax, 0xc
push 5
push eax
call fcn.101dcb20
add esp, 0xc
or eax, 0xffffffff
or edx, eax
pop esi
add esp, 0x18
ret
cmp dword [esp + 0x2c], 0
push ebx
push ebp
mov ebp, dword [esp + 0x30]
cdq
push edi
mov ebx, eax
mov edi, edx
xorps xmm0, xmm0
mov dword [esp + 0x24], ebx
mov dword [esp + 0x10], edi
mov dword [esp + 0x20], 0
movlpd qword [esp + 0x14], xmm0
jb 0x101dadb4
ja 0x101dad34
test ebp, ebp
je 0x101dadb4
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x18]
mov edi, dword [esp + 0x14]
lea edx, [ecx + 0xc]
mov dword [esp + 0x1c], eax
mov ebx, dword [esp + 0x30]
mov eax, edi
add eax, eax
mov eax, dword [ebx + eax*8]
mov ebx, dword [esp + 0x24]
shl eax, 4
add eax, dword [ecx + 0x40]
mov ecx, dword [eax + 4]
test ecx, ecx
jne 0x101dad65
mov ecx, dword [eax]
push edx
push 0x200
push esi
push ecx
call fcn.101dbbc0
add esp, 0x10
test eax, eax
js 0x101db063
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x2c]
mov eax, 1
cmovne edx, eax
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0x1c]
add edi, eax
adc edx, 0
cmp edx, dword [esp + 0x38]
mov dword [esp + 0x1c], edx
lea edx, [ecx + 0xc]
jb 0x101dad47
ja 0x101dadb0
lea edx, [ecx + 0xc]
cmp edi, ebp
jb 0x101dad47
mov edi, dword [esp + 0x10]
push esi
call dword [sym.imp.MSVCR110.dll_ftell]
add esp, 4
test eax, eax
jns 0x101dadd1
call dword [sym.imp.MSVCR110.dll__errno]
push dword [eax]
push 5
jmp 0x101db053
cdq
sub eax, ebx
mov ecx, edx
sbb ecx, edi
mov dword [esp + 0x14], eax
mov eax, dword [sym.imp.MSVCR110.dll_fwrite]
test edi, edi
mov edi, dword [sym.imp.MSVCR110.dll_putc]
mov dword [esp + 0x1c], ecx
ja 0x101dae12
jb 0x101dadf6
cmp ebx, 0xffffffff
ja 0x101dae12
cmp dword [esp + 0x38], 0
ja 0x101dae12
jb 0x101dae07
cmp ebp, 0xffff
ja 0x101dae12
cmp dword [esp + 0x20], 0
je 0x101daef3
push esi
push 4
push 1
push 0x104f421c
call eax
push esi
push 0
push 0x2c
call fcn.101dc620
push esi
push 0x2d
call edi
push esi
push 0
call edi
push esi
push 0x2d
call edi
push esi
push 0
call edi
push esi
push 0
call edi
add esp, 0x44
push esi
push 0
call edi
push esi
push 0
call edi
push esi
push 0
call edi
push esi
push 0
call edi
push esi
push 0
call edi
push esi
push 0
call edi
push esi
push 0
call edi
push esi
push dword [esp + 0x74]
push ebp
call fcn.101dc620
add esp, 0x44
push esi
push dword [esp + 0x3c]
push ebp
call fcn.101dc620
push esi
push dword [esp + 0x2c]
push dword [esp + 0x28]
call fcn.101dc620
push esi
push dword [esp + 0x2c]
push ebx
call fcn.101dc620
mov eax, dword [sym.imp.MSVCR110.dll_fwrite]
push esi
push 4
push 1
push 0x104f4224
call eax
push esi
push 0
call edi
push esi
push 0
call edi
add esp, 0x44
push esi
push 0
call edi
push esi
push 0
call edi
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x2c]
add ecx, ebx
adc eax, dword [esp + 0x20]
push esi
push eax
push ecx
call fcn.101dc620
push esi
push 1
call edi
push esi
push 0
call edi
push esi
push 0
call edi
push esi
push 0
call edi
mov eax, dword [sym.imp.MSVCR110.dll_fwrite]
add esp, 0x3c
push esi
push 4
push 1
push 0x104f422c
call eax
push esi
push 0
call edi
push esi
push 0
call edi
push esi
push 0
call edi
push esi
push 0
call edi
add esp, 0x30
cmp dword [esp + 0x38], 0
ja 0x101daf28
movzx eax, bp
cmp ebp, 0xffff
jb 0x101daf2d
mov eax, 0xffff
movzx ebx, ax
movzx eax, bl
push esi
push eax
call edi
push esi
shr ebx, 8
push ebx
call edi
add esp, 0x10
cmp dword [esp + 0x38], 0
ja 0x101daf53
movzx eax, bp
cmp ebp, 0xffff
jb 0x101daf58
mov eax, 0xffff
movzx ebx, ax
movzx eax, bl
push esi
push eax
call edi
push esi
shr ebx, 8
push ebx
call edi
add esp, 0x10
cmp dword [esp + 0x1c], 0
ja 0x101daf80
mov eax, dword [esp + 0x14]
cmp eax, 0xffffffff
jae 0x101daf80
mov ebx, eax
jmp 0x101daf83
or ebx, 0xffffffff
movzx eax, bl
push esi
push eax
call edi
mov eax, ebx
shr eax, 8
and eax, 0xff
push esi
push eax
call edi
mov eax, ebx
shr eax, 0x10
and eax, 0xff
push esi
push eax
call edi
push esi
shr ebx, 0x18
push ebx
call edi
add esp, 0x20
cmp dword [esp + 0x10], 0
ja 0x101dafc0
mov ebx, dword [esp + 0x24]
cmp ebx, 0xffffffff
jb 0x101dafc3
or ebx, 0xffffffff
movzx eax, bl
push esi
push eax
call edi
mov eax, ebx
shr eax, 8
and eax, 0xff
push esi
push eax
call edi
mov eax, ebx
shr eax, 0x10
and eax, 0xff
push esi
push eax
call edi
push esi
shr ebx, 0x18
push ebx
call edi
mov eax, dword [esp + 0x4c]
add esp, 0x20
cmp dword [eax + 0x2c], 0
je 0x101dafff
mov ebp, dword [eax + 0x28]
jmp 0x101db002
mov ebp, dword [eax + 0x24]
test ebp, ebp
je 0x101db00c
movzx eax, word [ebp + 4]
jmp 0x101db00e
xor eax, eax
movzx ebx, ax
movzx eax, bl
push esi
push eax
call edi
push esi
shr ebx, 8
push ebx
call edi
add esp, 0x10
test ebp, ebp
je 0x101db03b
movzx eax, word [ebp + 4]
push esi
push eax
mov eax, dword [sym.imp.MSVCR110.dll_fwrite]
push 1
push dword [ebp]
call eax
add esp, 0x10
push esi
call dword [sym.imp.MSVCR110.dll_ferror]
add esp, 4
test eax, eax
je 0x101db070
call dword [sym.imp.MSVCR110.dll__errno]
push dword [eax]
push 6
mov eax, dword [esp + 0x34]
add eax, 0xc
push eax
call fcn.101dcb20
add esp, 0xc
pop edi
pop ebp
or eax, 0xffffffff
pop ebx
or edx, eax
pop esi
add esp, 0x18
ret
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x1c]
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x18
ret