Function at 0x51a7d0
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x64fac0
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push ebp
push esi
push edi
mov eax, dword [0x74d890]
xor eax, esp
push eax
lea eax, [esp + 0x28]
mov dword fs:[0], eax
mov edi, ecx
mov esi, dword [edi + 0xc]
xor ebp, ebp
xor ecx, ecx
cmp esi, ebp
jle 0x51a827
xor edx, edx
cmp edx, ebp
jl 0x51a854
cmp ecx, esi
jge 0x51a854
mov eax, dword [edi + 8]
mov ebx, dword [esp + 0x38]
add eax, edx
cmp dword [eax], ebx
je 0x51aa54
inc ecx
add edx, 0xc
cmp ecx, esi
jl 0x51a806
lea ecx, [esp + 0x20]
call fcn.00402500
mov dword [esp + 0x30], ebp
mov dword [esp + 0x24], ebp
mov dword [esp + 0x30], 2
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x38]
mov dword [esp + 0x1c], eax
cmp edx, ebp
jne 0x51a859
xor eax, eax
jmp 0x51a869
call fcn.005e9bc5
mov eax, edx
lea esi, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x51a860
sub eax, esi
push eax
push edx
lea ecx, [esp + 0x28]
call fcn.00402960
mov ebx, dword [esp + 0x40]
mov eax, dword [esp + 0x24]
mov esi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
cmp ebx, eax
je 0x51a8aa
push eax
call esi
cmp ebx, ebp
je 0x51a8a6
push ebx
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov dword [esp + 0x24], eax
cmp eax, ebp
jne 0x51a8aa
push 0x8007000e
call fcn.00401090
mov dword [esp + 0x24], ebp
mov eax, dword [edi + 0xc]
lea ecx, [edi + 4]
lea edx, [esp + 0x1c]
push edx
push eax
call fcn.0051a770
mov eax, dword [edi + 0x18]
cmp eax, ebp
jne 0x51a8c5
lea eax, [edi + 0x1c]
lea edx, [eax + 2]
jmp 0x51a8d0
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x51a8d0
sub eax, edx
sar eax, 1
jne 0x51a929
mov dword [esp + 0x30], 3
mov eax, dword [esp + 0x24]
push eax
call esi
or ecx, 0xffffffff
mov dword [esp + 0x30], ecx
lea edx, [esp + 0x20]
mov dword [esp + 0x38], edx
mov dword [esp + 0x30], ecx
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x51aa54
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x51aa54
mov eax, dword [edi + 0x18]
cmp eax, ebp
jne 0x51a933
lea eax, [edi + 0x1c]
push 0x69a6fc
push eax
call fcn.0061849d
add esp, 8
mov dword [esp + 0x18], eax
cmp eax, ebp
je 0x51aa43
lea ecx, [esp + 0x14]
call fcn.00402500
mov byte [esp + 0x30], 6
push ebp
push ebp
push ebp
push ebp
push 0xffffffffffffffff
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push 0xfde9
call ebp
mov esi, eax
test esi, esi
jle 0x51aa28
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx - 8]
mov edx, 1
sub edx, dword [ecx - 4]
sub eax, esi
or eax, edx
jge 0x51a99d
push esi
lea ecx, [esp + 0x18]
call fcn.004020c0
mov ecx, dword [esp + 0x14]
cmp esi, dword [ecx - 8]
mov edi, ecx
jg 0x51aa6a
push 0
push 0
push esi
push edi
push 0xffffffffffffffff
push ebx
mov dword [ecx - 0xc], esi
mov ecx, dword [esp + 0x2c]
push 0
push 0xfde9
mov byte [esi + ecx], 0
call ebp
test eax, eax
je 0x51aa28
lea ecx, [esp + 0x40]
call fcn.00402500
mov byte [esp + 0x30], 7
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x38]
push edi
push edx
push eax
lea ecx, [esp + 0x4c]
push str._ld__s_r_n_s_r_n
push ecx
call fcn.00402f70
mov edx, dword [esp + 0x54]
mov eax, edx
add esp, 0x14
lea esi, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x51aa00
mov ecx, dword [esp + 0x18]
push ecx
sub eax, esi
push eax
push 1
push edx
call fcn.00618355
add esp, 0x10
mov byte [esp + 0x30], 6
lea ecx, [esp + 0x40]
call fcn.00402570
mov edx, dword [esp + 0x18]
push edx
call fcn.00618177
add esp, 4
mov byte [esp + 0x30], 2
lea ecx, [esp + 0x14]
call fcn.00402570
mov dword [esp + 0x30], 0xffffffff
lea ecx, [esp + 0x1c]
call fcn.00519ed0
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 0xc
push 0x80070057
call fcn.00401090
int3