Function at 0x18010da0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x22c
mov eax, dword [0x1804e020]
xor eax, esp
mov dword [esp + 0x228], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, ecx
mov ecx, 0xfeff
mov word [esp + 0x10], cx
push esi
mov edx, 0xd
mov ecx, 0xa
push edi
mov dword [esp + 0x1c], ebx
mov word [esp + 0xc], dx
mov word [esp + 0xe], cx
test eax, eax
jne 0x18010e06
cmp dword [ebx + 0x34], eax
jne 0x18010e24
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x228]
xor ecx, esp
call fcn.1802929c
mov esp, ebp
pop ebp
ret 4
push 0x104
lea edx, [esp + 0x2c]
push edx
push eax
call sym.HncBL90.dll_HncPathToAbsolute
lea eax, [esp + 0x28]
push eax
lea ecx, [ebx + 0x20]
call dword [sym.imp.MSVCP90.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::assign_unsigned_short_int_const__]
cmp dword [ebx + 0x38], 8
jb 0x18010e2f
mov eax, dword [ebx + 0x24]
jmp 0x18010e32
lea eax, [ebx + 0x24]
push 0x18040cd4
push eax
lea edi, [ebx + 0x3c]
push edi
call dword [sym.imp.MSVCR90.dll__wfopen_s]
add esp, 0xc
test eax, eax
je 0x18010e74
call fcn.18025bc0
mov dword [eax], 0
mov dword [eax + 4], 0
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x228]
xor ecx, esp
call fcn.1802929c
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebx]
mov dword [ebx + 0x40], 1
mov ecx, dword [eax + 0x10]
sub ecx, dword [eax + 0xc]
sar ecx, 2
test ecx, ecx
jbe 0x18010ded
mov esi, dword [edi]
test esi, esi
je 0x18010eba
push 0
push 0
push esi
call dword [sym.imp.MSVCR90.dll_fseek]
add esp, 0xc
test eax, eax
jne 0x18010eb0
push esi
call dword [sym.imp.MSVCR90.dll_ftell]
add esp, 4
cmp eax, 0xffffffff
jne 0x18010eba
call fcn.18012c50
mov eax, dword [edi]
lea edx, [esp + 0x18]
push 2
push edx
call fcn.18010960
mov eax, dword [ebx + 0x18]
add esp, 8
test eax, eax
je 0x18010f0a
cmp dword [ebx + 0x1c], 8
jb 0x18010edd
mov ecx, dword [ebx + 8]
jmp 0x18010ee0
lea ecx, [ebx + 8]
add eax, eax
push eax
mov eax, dword [edi]
push ecx
call fcn.18010960
mov eax, dword [edi]
lea ecx, [esp + 0x14]
push 4
push ecx
call fcn.18010960
mov eax, dword [edi]
lea edx, [esp + 0x1c]
push 4
push edx
call fcn.18010960
add esp, 0x18
mov eax, dword [ebx]
mov esi, dword [eax + 0x10]
sub esi, dword [eax + 0xc]
mov dword [esp + 0x10], 0
sar esi, 2
mov dword [esp + 0x14], esi
test esi, esi
jle 0x180110d7
mov eax, dword [esp + 0x1c]
mov ebx, dword [esp + 0x10]
mov eax, dword [eax]
call fcn.18012a60
mov ebx, dword [eax]
test ebx, ebx
je 0x18010ded
cmp dword [ebx + 0x18], 8
mov ecx, dword [ebx + 0x14]
jb 0x18010f50
mov eax, dword [ebx + 4]
jmp 0x18010f53
lea eax, [ebx + 4]
add ecx, ecx
push ecx
push eax
mov eax, dword [edi]
call fcn.18010960
mov eax, dword [edi]
add esp, 8
test eax, eax
jne 0x18010f9c
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x18010faf
jns 0x18010f77
mov esi, eax
jmp 0x18010f88
test eax, eax
jg 0x18010f7f
mov esi, eax
jmp 0x18010f88
movzx esi, ax
or esi, 0x80070000
call fcn.18025bc0
mov dword [eax], esi
mov esi, dword [esp + 0x14]
mov dword [eax + 4], 0
jmp 0x18010faf
push eax
push 4
lea edx, [esp + 0x14]
push 1
push edx
call dword [sym.imp.MSVCR90.dll_fwrite]
add esp, 0x10
mov eax, dword [ebx + 0x1c]
mov dword [esp + 0x24], eax
test eax, eax
je 0x18010ded
mov ecx, dword [eax + 0x10]
sub ecx, dword [eax + 0xc]
sar ecx, 2
mov dword [esp + 0x20], ecx
test ecx, ecx
jle 0x180110c2
xor ebx, ebx
test ecx, ecx
jle 0x18011074
jmp 0x18010fe4
mov eax, dword [esp + 0x24]
call fcn.18012a60
mov esi, dword [eax]
test esi, esi
je 0x18010ded
mov ecx, dword [esi + 0x14]
test ecx, ecx
je 0x18011024
cmp dword [esi + 0x18], 8
jb 0x18011005
mov eax, dword [esi + 4]
jmp 0x18011008
lea eax, [esi + 4]
add ecx, ecx
push ecx
push eax
mov eax, dword [edi]
call fcn.18010960
mov eax, dword [edi]
push 2
push 0x180414b8
call fcn.18010960
add esp, 0x10
mov ecx, dword [esi + 0x30]
test ecx, ecx
je 0x18011048
cmp dword [esi + 0x34], 8
jb 0x18011036
mov eax, dword [esi + 0x20]
jmp 0x18011039
lea eax, [esi + 0x20]
lea edx, [ecx + ecx]
push edx
push eax
mov eax, dword [edi]
call fcn.18010960
add esp, 8
cmp dword [esi + 0x14], 0
jne 0x18011054
cmp dword [esi + 0x30], 0
je 0x18011065
lea eax, [esp + 0xc]
push 4
push eax
mov eax, dword [edi]
call fcn.18010960
add esp, 8
inc ebx
cmp ebx, dword [esp + 0x20]
jl 0x18010fe0
mov esi, dword [esp + 0x14]
mov eax, dword [edi]
test eax, eax
jne 0x180110af
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x180110c2
jns 0x1801108a
mov esi, eax
jmp 0x1801109b
test eax, eax
jg 0x18011092
mov esi, eax
jmp 0x1801109b
movzx esi, ax
or esi, 0x80070000
call fcn.18025bc0
mov dword [eax], esi
mov esi, dword [esp + 0x14]
mov dword [eax + 4], 0
jmp 0x180110c2
push eax
push 4
lea ecx, [esp + 0x14]
push 1
push ecx
call dword [sym.imp.MSVCR90.dll_fwrite]
add esp, 0x10
mov eax, dword [esp + 0x10]
inc eax
cmp eax, esi
mov dword [esp + 0x10], eax
jl 0x18010f29
mov ebx, dword [esp + 0x1c]
mov eax, dword [edi]
test eax, eax
je 0x180110e7
push eax
call dword [sym.imp.MSVCR90.dll_fclose]
add esp, 4
mov ecx, dword [esp + 0x234]
xor eax, eax
mov dword [edi], eax
pop edi
mov dword [ebx + 0x40], eax
mov dword [ebx + 0x48], eax
pop esi
pop ebx
xor ecx, esp
mov eax, 1
call fcn.1802929c
mov esp, ebp
pop ebp
ret 4