Function at 0x51d270
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x64d8a0
mov eax, dword fs:[0]
push eax
sub esp, 0x48
push ebx
push ebp
push esi
push edi
mov eax, dword [0x7496c8]
xor eax, esp
push eax
lea eax, [esp + 0x5c]
mov dword fs:[0], eax
mov esi, ecx
xor ebx, ebx
cmp dword [esi + 8], ebx
jne 0x51d2a8
cmp byte [esi + 4], bl
jne 0x51d2a8
mov byte [esi + 0xc], bl
lea ecx, [esp + 0x18]
call fcn.00402500
mov dword [esp + 0x64], ebx
lea ecx, [esp + 0x1c]
call fcn.00402500
mov byte [esp + 0x64], 1
mov eax, dword [esi + 0x48]
cmp eax, ebx
jne 0x51d2cd
lea eax, [esi + 0x4c]
lea ecx, [esp + 0x1c]
push ecx
push eax
call fcn.0051d220
add esp, 8
test eax, eax
je 0x51d2f8
mov edx, dword [esp + 0x1c]
push edx
lea eax, [esp + 0x1c]
push str.utf8_s
push eax
call fcn.00402f80
add esp, 0xc
jmp 0x51d30c
mov eax, dword [esi + 0x48]
cmp eax, ebx
jne 0x51d302
lea eax, [esi + 0x4c]
push eax
lea ecx, [esp + 0x1c]
call fcn.0040e430
lea ecx, [esp + 0x14]
call fcn.00402500
mov byte [esp + 0x64], 2
mov eax, dword [esi + 0x14]
cmp eax, ebx
jne 0x51d324
lea eax, [esi + 0x18]
lea ecx, [esp + 0x1c]
push ecx
push eax
call fcn.0051d220
add esp, 8
test eax, eax
je 0x51d34f
mov edx, dword [esp + 0x1c]
push edx
lea eax, [esp + 0x18]
push str.utf8_s
push eax
call fcn.00402f80
add esp, 0xc
jmp 0x51d363
mov eax, dword [esi + 0x14]
cmp eax, ebx
jne 0x51d359
lea eax, [esi + 0x18]
push eax
lea ecx, [esp + 0x18]
call fcn.0040e430
mov eax, dword [esp + 0x14]
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x51d370
sub eax, edx
mov edx, eax
mov eax, dword [esp + 0x18]
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x51d382
sub eax, edi
lea edi, [eax + edx + 0x130]
push edi
mov dword [esp + 0x24], edi
call fcn.005e76b2
mov ebp, eax
add esp, 4
cmp ebp, ebx
jne 0x51d3bc
mov byte [esp + 0x64], 1
lea ecx, [esp + 0x14]
call fcn.00402570
mov byte [esp + 0x64], bl
jmp 0x51d5c1
push edi
push ebx
push ebp
call fcn.00613900
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 8]
mov edx, dword [esi + 0x54]
mov dword [esp + 0x40], eax
mov eax, dword [esi + 0x24]
mov dword [esp + 0x4c], eax
mov eax, dword [esi + 0x2c]
mov dword [esp + 0x38], ecx
mov ecx, dword [esi + 0x28]
mov dword [esp + 0x50], eax
mov eax, dword [esi + 0x34]
mov dword [esp + 0x3c], edx
mov edx, dword [esi + 0x30]
mov dword [esp + 0x34], ecx
mov ecx, dword [esi + 0x38]
mov dword [esp + 0x54], eax
movzx eax, byte [esi + 4]
mov dword [esp + 0x34], edx
mov edx, dword [esi + 0x3c]
mov dword [esp + 0x34], ecx
movzx ecx, byte [esi + 0xc]
mov byte [esp + 0x5c], al
movzx eax, byte [esi + 0x43]
mov dword [esp + 0x58], edx
movzx edx, byte [esi + 0x20]
mov byte [esp + 0x5d], cl
movzx ecx, byte [esi + 0x42]
mov byte [esp + 0x5f], al
movzx eax, byte [esi + 0x40]
mov byte [esp + 0x5e], dl
movzx edx, byte [esi + 0x41]
mov byte [esp + 0x60], cl
movzx ecx, byte [esi + 0x23]
mov byte [esp + 0x62], al
movzx eax, byte [esi + 0x22]
mov byte [esp + 0x61], dl
movzx edx, byte [esi + 0x21]
mov byte [esp + 0x63], cl
mov ecx, dword [esp + 0x20]
mov byte [esp + 0x65], al
mov eax, ecx
add esp, 0xc
mov byte [esp + 0x58], dl
mov dword [esp + 0x38], 0x30
lea edi, [eax + 1]
mov edi, edi
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x51d470
sub eax, edi
push eax
push ecx
lea ecx, [ebp + 0x30]
push ecx
call fcn.00614de0
mov eax, dword [esp + 0x20]
add esp, 0xc
lea ecx, [eax + 1]
mov edi, edi
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x51d490
sub eax, ecx
lea edi, [eax + 0x30]
mov byte [edi + ebp], bl
mov ecx, dword [esp + 0x18]
inc edi
mov eax, ecx
mov dword [esp + 0x3c], edi
lea edx, [eax + 1]
lea ecx, [ecx]
mov bl, byte [eax]
inc eax
test bl, bl
jne 0x51d4b0
sub eax, edx
push eax
push ecx
lea edx, [edi + ebp]
push edx
call fcn.00614de0
mov eax, dword [esp + 0x24]
add esp, 0xc
lea ecx, [eax + 1]
mov edi, edi
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x51d4d0
sub eax, ecx
add edi, eax
mov byte [edi + ebp], dl
inc edi
cmp byte [esi + 0x44], dl
setne al
mov byte [edi + ebp], al
mov esi, dword [esi + 0x58]
inc edi
cmp esi, 0x10
jne 0x51d4f5
mov eax, esi
jmp 0x51d501
xor eax, eax
cmp esi, 0x20
setne al
dec eax
and eax, 0x20
mov byte [edi + ebp], al
mov ecx, 0xc
lea esi, [esp + 0x2c]
mov edi, ebp
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x6c]
push 0x67714c
push edi
call fcn.00615f0d
mov esi, eax
add esp, 8
test esi, esi
jne 0x51d58e
call fcn.00618a54
mov esi, dword [eax]
lea ecx, [esp + 0x20]
call fcn.00402500
mov byte [esp + 0x64], 3
push 0
push 0
lea ecx, [esp + 0x74]
push ecx
push 0x400
push esi
push 0
push 0x1100
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov edx, dword [esp + 0x6c]
mov eax, dword [0x74ff78]
push edx
push edi
push eax
lea ecx, [esp + 0x2c]
push ecx
call fcn.00402f80
mov edx, dword [esp + 0x7c]
add esp, 0x10
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov byte [esp + 0x64], 2
lea ecx, [esp + 0x20]
call fcn.00402570
jmp 0x51d5a5
mov eax, dword [esp + 0x20]
push esi
push eax
push 1
push ebp
call fcn.00615dc5
push esi
call fcn.00615be7
add esp, 0x14
push ebp
call fcn.005e76a7
add esp, 4
mov byte [esp + 0x64], 1
lea ecx, [esp + 0x14]
call fcn.00402570
mov byte [esp + 0x64], 0
lea ecx, [esp + 0x1c]
call fcn.00402570
mov dword [esp + 0x64], 0xffffffff
lea ecx, [esp + 0x18]
call fcn.00402570
mov ecx, dword [esp + 0x5c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret 4